package com.dcd.controller;

import com.dcd.pojo.Energy;
import com.dcd.service.EnergyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class EnergyController {

    @Autowired
    private EnergyService energyService;

    /**
     * 查询全部能源
     *
     * @return
     */
    @RequestMapping("/select_all_energy")
    public List<Energy> select_all_energy() {
        return energyService.select_all_energy();
    }
}
